import { fromJS } from "immutable";
import { GET_DETAIL } from "./actiontyps";


const defaultState = fromJS({
    title: '',
    content: ''
})

export const DetailReducer = (state=defaultState, action) => {
    switch(action.type){
        case GET_DETAIL:
            return state.set('title', action.title).set('content', action.content)
        default:
            return state
    }
}